import {INCREMENT, DECREMENT} from '../action_types'
export default function countReducers (preState = 0, { type, data }) {
    switch (type) {
      case INCREMENT:
        return  preState + data
      case DECREMENT:
        return preState - data
      default:
        return preState
    }
}